﻿<%@ Page Title="Register | Hardwares-R-Us" Language="C#" MasterPageFile="~/Main.Master"
    CodeBehind="Register.aspx.cs" AutoEventWireup="true" Inherits="WDTAsg2.Register"
    Theme="Normal_User_Theme" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <body>
        <h1>
            Hardwares-R-Us Registration</h1>
        <h2>
            Enter Your Information.</h2>
        <div id="form">
            <form id="form1">
            <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" OnCreatedUser="CreateUserWizard1_CreatedUser"
                RequireEmail="False">
                <WizardSteps>
                    <asp:WizardStep ID="WizardStep1" runat="server" StepType="Start" Title="Personal">
                        <table class="rego">
                            <td align="right">
                                <asp:Label ID="Label3" runat="server" Text="First Name: "></asp:Label>
                            </td>
                            <td align="left">
                                <asp:TextBox ID="FirstName" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="FirstName"
                                    ErrorMessage="*"></asp:RequiredFieldValidator>
                            </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label4" runat="server" Text="Last Name: "></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="LastName" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="LastName"
                                        ErrorMessage="*"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label1" runat="server" Text="Age: "></asp:Label>
                                </td>
                                <td colspan="1">
                                    <asp:TextBox ID="Age" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="Age"
                                        ErrorMessage="*"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td align="right">
                                    <asp:Label ID="Label2" runat="server" Text="Address:"></asp:Label>
                                </td>
                                <td>
                                    <asp:TextBox ID="Address" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="Address"
                                        ErrorMessage="*"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="Age" ErrorMessage="Must be of 18 - 90 years "
                                    MaximumValue="90" MinimumValue="18" Type="Integer"></asp:RangeValidator>
                            </tr>
                        </table>
                        <br />
                        <br />
                    </asp:WizardStep>
                    <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" Title="Login Details">
                        <ContentTemplate>
                            <table class="rego">
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">Email:</asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
                                            ErrorMessage="User Name is required." ToolTip="User Name is required.">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="Password" runat="server" TextMode="Password"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                                            ErrorMessage="Password is required." ToolTip="Password is required.">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" ControlToValidate="ConfirmPassword"
                                            ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required.">*</asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">
                                        <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" Visible="false">E-mail:</asp:Label>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="Email" runat="server" Visible="false" CausesValidation="True"></asp:TextBox>
                                    </td>
                                    <tr>
                                        <td align="center" class="style1" colspan="2">
                                            <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                                                ControlToValidate="ConfirmPassword" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                                ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
                                            <asp:RegularExpressionValidator ValidationGroup="CreateUserWizard1" ID="RegularExpressionValidator1"
                                                runat="server" ControlToValidate="UserName" ErrorMessage="Email address is not valid"
                                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="4" style="color: Red;">
                                            <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                                        </td>
                                    </tr>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:CreateUserWizardStep>
                    <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                        <ContentTemplate>
                            <table>
                                <tr>
                                    <td align="center">
                                        Complete
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Your account has been successfully created.
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Button ID="ContinueButton" runat="server" CausesValidation="False" CommandName="Continue"
                                            OnClick="ContinueButton_Click" Text="Continue" ValidationGroup="CreateUserWizard1" />
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </asp:CompleteWizardStep>
                </WizardSteps>
                <StartNavigationTemplate>
                    <div id="startnav">
                        <asp:Button ID="StartNextButton" runat="server" CommandName="MoveNext" Text="Next" />
                    </div>
                </StartNavigationTemplate>
            </asp:CreateUserWizard>
            </form>
        </div>
    </body>
    </html>
</asp:Content>
